
package com.mykt.system;

import com.mykt.baseResult.RespondsResult;
import com.mykt.constant.SecurityConstants;
import com.mykt.domain.SystemLoginLog;
import com.mykt.domain.SystemUser;
import com.mykt.domain.log.SystemOperLog;
import com.mykt.fallback.RemoteUserFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


@FeignClient(name = "mykt-system", contextId = "remoteUserService", path = "/mykt/system" ,
        fallback = RemoteUserFallback.class)
public interface RemoteUserService {

    @GetMapping(value = "/user/info")
    public RespondsResult<SystemUser> info(@RequestParam("userName") String userName,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/loginLog/add")
    public RespondsResult add(@RequestBody SystemLoginLog logininfor,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/log/write")
    public RespondsResult write(@RequestBody SystemOperLog operLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}

